package com.dao.impl;

import com.dao.NewsDao;
import com.dao.NewsrecordDao;
import com.entity.News;
import com.entity.Newsrecord;
import com.mapper.NewsMapper;
import com.mapper.NewsrecordMapper;
import com.page.PageInfo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository("NewsrecordDao")//一般实现类不会直接生成默认对象名 而是使用 接口的默认对象名
public class NewsrecordDaoImpl implements NewsrecordDao {
    @Resource //autowired 会装配能够直接扫描到的对象  resource spring容器运行的时候才找到需要的对象  注入
    private NewsrecordMapper newsrecordMapper;

    @Override
    public Integer addNewsrecord(Newsrecord newsrecord) {
        return newsrecordMapper.insertSelective(newsrecord);
    }

}
